home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / MM3Tp.sea Folder / Made by Marksman / Sources / u / My_Alert.p < prev    next >
Text File  |  1994-01-16  |  3KB  |  101 lines

  1.  
  2. unit UMy_Alert;
  3. {  My_Alert                                 Handle this alert }
  4. {  Copyright © 1994 George R. Cossey }
  5.  
  6. {    File name:  My_Alert
  7.     Function:  Handle this alert.
  8.     This is a CAUTION alert, it is used to inform the user that if the current path
  9.     is taken then data may be lost.  The user can change the present course and
  10.     save the data.  This is the type of alert used to tell the user that he needs to
  11.     save the data before going on.
  12.  
  13.     This alert is called when:
  14.  
  15.     The choices in this alert allow for:
  16.         
  17.     History: 1/16/94 Original by George Cossey
  18.  
  19. }
  20.  
  21.  
  22. interface
  23.  
  24.     uses
  25.         Printing, Folders, Sound,mmCommonMM_Demo,CommonMM_Demo;
  26.  
  27. { ======================================================= }
  28. { ======================================================= }
  29.  
  30. { This routine is called at program startup to allow setting of any special }
  31. {  items for the alert }
  32. procedure A_Init_My_Alert;
  33.  
  34. { This routine is called while inside of the Alert filter }
  35. {        theDialog is the dialog(alert) pointer }
  36. {        theEvent is the event that we are to see if we should filter }
  37. {        itemHit is the item we set if we handle the event ourselves }
  38. function Filter_My_Alert(theDialog:DialogPtr;var theEvent:EventRecord;var itemHit:integer):Boolean;
  39.  
  40. { This routine is called after the alert has been responded to }
  41. { itemHit is the item that was selected }
  42. procedure A_Hit_My_Alert(itemHit:integer);
  43.  
  44. { ======================================================= }
  45. { ======================================================= }
  46.  
  47. implementation
  48.  
  49. { ======================================================= }
  50. { ======================================================= }
  51.  
  52. { Routine: A_Init_My_Alert }
  53. { Purpose: This routine is called at program startup to allow setting of any special }
  54. { items for the alert }
  55.  
  56. procedure A_Init_My_Alert;
  57.  
  58.  
  59. begin
  60. end;
  61.  
  62. { ======================================================= }
  63.  
  64. { Routine: Filter_Caution_alert }
  65. { Purpose: This routine is called while inside of the Alert filter }
  66.  
  67. function Filter_My_Alert(theDialog:DialogPtr;var theEvent:EventRecord;var itemHit:integer):Boolean;
  68. var
  69.      the_Filter_My_Alert:Boolean;
  70.  
  71.  
  72. begin
  73. the_Filter_My_Alert := FALSE;                    { Let the Alert routine handle it }
  74. Filter_My_Alert := the_Filter_My_Alert;    { return the result }
  75. end;
  76.  
  77. { ======================================================= }
  78.  
  79. { Routine: A_Hit_My_Alert }
  80. { Purpose: This routine is called after the alert has been responded to }
  81. { itemHit is the item that was selected }
  82.  
  83. procedure A_Hit_My_Alert(itemHit:integer);
  84.  
  85.  
  86. begin
  87. { This is the default selection, when RETURN is pressed. }
  88. if (ResA_Cancel = itemHit) then                { Cancel,See if this control was selected }
  89.     begin
  90.     end;
  91.  
  92. if (ResA_OK2 = itemHit) then                { OK,See if this control was selected }
  93.     begin
  94.     end;
  95.  
  96. end;
  97.  
  98. { ======================================================= }
  99. { ======================================================= }
  100. end.
  101.